<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AddNetGaugeToSiteLocationMall extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('site_location_mall', function (Blueprint $table) {
            $table->unsignedInteger('status')->default(0)->after('id')->comment('状态');
            $table->string('wgNumber', 12)->default('')->after('id')->comment('网规编号');
            $table->unsignedInteger('shopNum')->default(0)->after('mallId')->comment('已入驻门店数量');
            $table->unsignedInteger('car')->default(0)->after('lat')->comment('养车/用车');
            $table->unsignedInteger('healthcare')->default(0)->after('lat')->comment('医疗健康');
            $table->unsignedInteger('food')->default(0)->after('lat')->comment('美食店铺数');
            $table->unsignedInteger('study')->default(0)->after('lat')->comment('学习培训');
            $table->unsignedInteger('scenicSpot')->default(0)->after('lat')->comment('景点/周边游');
            $table->unsignedInteger('Shopping')->default(0)->after('lat')->comment('购物');
            $table->unsignedInteger('marry')->default(0)->after('lat')->comment('结婚');
            $table->unsignedInteger('beauty')->default(0)->after('lat')->comment('丽人');
            $table->unsignedInteger('homeFurnishing')->default(0)->after('lat')->comment('家居');
            $table->unsignedInteger('cinema')->default(0)->after('lat')->comment('电影演出赛事');
            $table->unsignedInteger('homestay')->default(0)->after('lat')->comment('榛果民宿');
            $table->unsignedInteger('parentChild')->default(0)->after('lat')->comment('亲子');
            $table->unsignedInteger('recreation')->default(0)->after('lat')->comment('休闲娱乐');
            $table->unsignedInteger('hotel')->default(0)->after('lat')->comment('酒店');
            $table->unsignedInteger('KSong')->default(0)->after('lat')->comment('K歌');
            $table->unsignedInteger('pat')->default(0)->after('lat')->comment('宠物');
            $table->unsignedInteger('life')->default(0)->after('lat')->comment('生活服务');
            $table->unsignedInteger('sport')->default(0)->after('lat')->comment('运动健身');
            $table->unsignedInteger('traffic')->default(0)->after('lat')->comment('交通枢纽');
            $table->unsignedInteger('shopTotalCount')->default(0)->after('lat')->comment('商场店铺数量');
            $table->float('foodRatio', 7, 4)->default(0)->after('lat')->comment('美食店铺占比');
            $table->unsignedInteger('grade')->default(0)->after('id')->comment('商场分级');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('site_location_mall', function (Blueprint $table) {
            $table->dropColumn('wgNumber');
            $table->dropColumn('status');
            $table->dropColumn('shopNum');
            $table->dropColumn('car');
            $table->dropColumn('healthcare');
            $table->dropColumn('food');
            $table->dropColumn('study');
            $table->dropColumn('scenicSpot');
            $table->dropColumn('Shopping');
            $table->dropColumn('marry');
            $table->dropColumn('beauty');
            $table->dropColumn('homeFurnishing');
            $table->dropColumn('cinema');
            $table->dropColumn('homestay');
            $table->dropColumn('parentChild');
            $table->dropColumn('recreation');
            $table->dropColumn('hotel');
            $table->dropColumn('KSong');
            $table->dropColumn('pat');
            $table->dropColumn('life');
            $table->dropColumn('sport');
            $table->dropColumn('traffic');
            $table->dropColumn('foodRatio');
            $table->dropColumn('shopTotalCount');
            $table->dropColumn('grade');
        });
    }
}
